import 'package:flutter/material.dart';

import 'app_color.dart';
import 'app_dimen.dart';

class AppStyle {
  AppStyle._();
  static ThemeData light = ThemeData(
    fontFamily: 'SourceHanSansCN',
    useMaterial3: false,
    primaryColor: AppColors.priceInputBorderColor,
    appBarTheme: const AppBarTheme(
      backgroundColor: Colors.white,
      foregroundColor: Color.fromARGB(200, 0, 0, 0),
      centerTitle: true,
      titleTextStyle: TextStyle(
        fontSize: 18,
        fontWeight: FontWeight.bold,
        color: Color.fromARGB(200, 0, 0, 0),
      ),
    ),
  );

  static const regular = FontWeight.w400;
  static const medium = FontWeight.w500;
  static const semiBold = FontWeight.w600;
  static const bold = FontWeight.w700;

  static TextStyle app_text =  TextStyle(fontSize: AppDimen.sp_19, color: AppColors.text);

  static TextStyle app_text_14 =  app_text.copyWith(fontSize: AppDimen.sp_14);
  static TextStyle app_text_14_bold = app_text_14.copyWith(fontWeight: FontWeight.bold);

  static TextStyle app_text_16 = app_text_14.copyWith(fontSize: AppDimen.sp_16);
  static TextStyle app_text_16_bold =
      app_text_16.copyWith(fontWeight: FontWeight.bold);
  static TextStyle app_text_18 = app_text_14.copyWith(fontSize: AppDimen.sp_18);
  static TextStyle app_text_18_bold =
      app_text_18.copyWith(fontWeight: FontWeight.bold);
  static TextStyle app_text_20 = app_text_14.copyWith(fontSize: AppDimen.sp_20);
  static TextStyle app_text_20_bold =
      app_text_20.copyWith(fontWeight: FontWeight.bold);

  static TextStyle app_text_12 = app_text_14.copyWith(fontSize: AppDimen.sp_12);
  static TextStyle app_text_13 = app_text_14.copyWith(fontSize: AppDimen.sp_13);
  static TextStyle app_text_11 = app_text_14.copyWith(fontSize: AppDimen.sp_11);
  static TextStyle app_text_10 = app_text_14.copyWith(fontSize: AppDimen.sp_10);
  static TextStyle app_text_19 = app_text_14.copyWith(fontSize: AppDimen.sp_19);
  static TextStyle app_text_25 = app_text.copyWith(fontSize: AppDimen.sp_25);


  static ButtonStyle app_btn_light = ButtonStyle(
    shape: MaterialStateProperty.all(
        RoundedRectangleBorder(borderRadius: BorderRadius.circular(AppDimen.dp_11))),
    textStyle: MaterialStateProperty.all(app_text_16_bold.copyWith(fontSize: AppDimen.sp_25)),
    foregroundColor: MaterialStateProperty.all(AppColors.white),
    backgroundColor: MaterialStateProperty.resolveWith<Color>((Set<MaterialState> states) {
      if (states.contains(MaterialState.disabled)) {
        return AppColors.d8d8d8;
      }
      return AppColors.e3a671; // Use the component's default.
    }),
  );

  static ButtonStyle app_btn = app_btn_light.copyWith(
      foregroundColor: MaterialStateProperty.all(AppColors.text),
      backgroundColor: MaterialStateProperty.all(AppColors.white));

  static ButtonStyle app_btn_gary = app_btn_light.copyWith(
      foregroundColor: MaterialStateProperty.all(AppColors.text),
      backgroundColor: MaterialStateProperty.all(AppColors.gray));
  static ButtonStyle app_btn_dark = app_btn_light.copyWith(
      backgroundColor: MaterialStateProperty.all(AppColors.text));


}
